
function getBacktest(dir, backtest)
{
    $.ajax({
        type: "post",
        data: {},
        url: "/strategys?method=get_backtest&dir="+dir+"&backtest="+backtest,
        dataType: "html",
        success: function (data) {
            $("#rightpage").html(data);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert(errorThrown);
        }
    });
}

function getStrategysAdmin()
{
    $.ajax({
        type: "get",
        data: {},
        url: "/admin",
        dataType: "html",
        success: function (data) {
            $("#index_main_page").html(data);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert(errorThrown);
        }
    });
}

function getInstances()
{
    $.ajax({
        type: "post",
        data: {},
        url: "/admin?method=get_instances",
        dataType: "html",
        success: function (data) {
            $("#mainpage").html(data);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert(errorThrown);
        }
    });
}

function getInstance(instance_id)
{
    $.ajax({
        type: "post",
        data: {},
        url: "/admin?method=get_instance&instance_id="+instance_id,
        dataType: "html",
        success: function (data) {
            $("#detail").html(data);
        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
            alert(errorThrown);
        }
    });
}

